﻿namespace ProblemsSet
{
    public class Problem_16 : BaseProblem
    {
        public override object GetResult()
        {
            const int mxPow = 1000;
            const long bas = 2;
            long rs = 0;
            var res = bas.ToString();
            for (var i = 2; i <= mxPow; i++)
            {
                res = MathLogic.MultipleString(res, bas, out rs);
            }
            return rs;
        }

        public override string Problem
        {
            get
            {
                return @"2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.

What is the sum of the digits of the number 2^1000?";
            }
        }

        public override bool IsSolved
        {
            get
            {
                return true;
            }
        }

        public override object Answer
        {
            get
            {
                return 1366;
            }
        }

    }
}
